using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.WorkFlow.Entities
{
public partial class TaskKeyValue
{
readonly static Action<TaskKeyValue,object>[] _SetValues=new Action<TaskKeyValue,object>[]{(r,t)=>r.Disabled=Reflection.ParseObject(t, r.Disabled),(r,t)=>r.KeyId=Reflection.ParseObject(t, r.KeyId),(r,t)=>r.Seq=Reflection.ParseObject(t, r.Seq),(r,t)=>r.Text=Reflection.ParseObject(t, r.Text),(r,t)=>r.Value=Reflection.ParseObject(t, r.Value)};
readonly static string[] _Columns=new string[]{"Disabled","KeyId","Seq","Text","Value"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"Disabled", this.Disabled);
AppendValue(action,"KeyId", this.KeyId);
AppendValue(action,"Seq", this.Seq);
AppendValue(action,"Text", this.Text);
AppendValue(action,"Value", this.Value);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[5];
cols[0]= RecordColumn.Column("Disabled",this.Disabled);
cols[1]= RecordColumn.Column("KeyId",this.KeyId);
cols[2]= RecordColumn.Column("Seq",this.Seq);
cols[3]= RecordColumn.Column("Text",this.Text);
cols[4]= RecordColumn.Column("Value",this.Value);
return cols;
}

}
}

